<?php

namespace App\Http\Controllers\Home;

use App\Model\writer_take;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use phpDocumentor\Reflection\DocBlockFactory;

class userPaymentController extends Controller
{
    public function show($id)
    {
        $money=DB::table('writer_takes')->join('writers','.writers.id','writer_takes.wid')->where('writer_takes.wid',$id)->get();
        return view('huweize.home.userPayment',compact('money'));
    }

    public function sort($id){
        $money=DB::table('writer_takes')->join('writers','.writers.id','writer_takes.wid')->orderby('data','desc')->where('writer_takes.wid',$id)->paginate(8);
        return view('huweize.home.userPayment',compact('money'));
    }
}
